//
// Created by 46508 on 2024/5/21.
//

#include <vulkan/vulkan.h>
#include "luavulkan.h"
#include "log.h"
#include "luautil.h"

static void lua_pushVkApplicationInfo(lua_State *L, const VkApplicationInfo &info);

GEN_LUA_TYPE_PUSH_FUNC(VkPhysicalDevice)

GEN_LUA_TYPE_PUSH_FUNC(VkInstance)

#define lua_push_array(L, type, array, size) __code( \
    lua_newtable(L);                                 \
    for (int i = 0; i < (size); i++) {               \
        lua_pushinteger(L, i + 1);                   \
        lua_push##type(L, (array)[i]);               \
        lua_settable(L, -3);                         \
    } lua_pushstring(L, "n");                        \
    lua_pushinteger(L, size);                        \
    lua_settable(L, -3);)

#define lua_settable_value(L, TYPE, NAME, VALUE) __code( \
    lua_pushstring(L, #NAME);                            \
    lua_push##TYPE(L, (VALUE));                          \
    lua_settable(L, -3);)

#define lua_settable_field(L, TYPE, VALUE, NAME) lua_settable_value(L, TYPE, NAME, (VALUE.NAME))

#define lua_settable_field_arraye(L, TYPE, VALUE, NAME, N) __code( \
    lua_pushstring(L, #NAME);                                      \
    lua_push_array(L, TYPE, VALUE.NAME, N);                        \
    lua_settable(L, -3);)

#define lua_gettable_value(L, I, TYPE, NAME, VALUE) __code( \
    lua_getfield(L, I, #NAME);                              \
    VALUE = luaL_check##TYPE(L, -1);                        \
    lua_pop(L, 1);)

#define lua_gettable_field(L, I, TYPE, VALUE, NAME) lua_gettable_value(L, I, TYPE, NAME, (VALUE.NAME))

#define lua_gettable_field_arraye(L, I, TYPE, VALUE, NAME, N) __code( \
    lua_getfield(L, I, #NAME);                                        \
    size_t n = lua_rawlen(L, -1);                                     \
    for (int i = 0; i < n; i++) {                                     \
    } lua_pop(L, 1);)
#define lua_pushVkPhysicalDeviceSparseProperties(L, properties) __code(                   \
    lua_newtable(L);                                                                      \
    lua_settable_field(L, integer, properties, residencyStandard2DBlockShape);            \
    lua_settable_field(L, integer, properties, residencyStandard2DMultisampleBlockShape); \
    lua_settable_field(L, integer, properties, residencyStandard3DBlockShape);            \
    lua_settable_field(L, integer, properties, residencyAlignedMipSize);                  \
    lua_settable_field(L, integer, properties, residencyNonResidentStrict);)

#define lua_pushVkPhysicalDeviceLimits(L, limits) __code(                                    \
    lua_newtable(L);                                                                         \
    lua_settable_field(L, integer, limits, maxImageDimension1D);                             \
    lua_settable_field(L, integer, limits, maxImageDimension2D);                             \
    lua_settable_field(L, integer, limits, maxImageDimension3D);                             \
    lua_settable_field(L, integer, limits, maxImageDimensionCube);                           \
    lua_settable_field(L, integer, limits, maxImageArrayLayers);                             \
    lua_settable_field(L, integer, limits, maxTexelBufferElements);                          \
    lua_settable_field(L, integer, limits, maxUniformBufferRange);                           \
    lua_settable_field(L, integer, limits, maxStorageBufferRange);                           \
    lua_settable_field(L, integer, limits, maxPushConstantsSize);                            \
    lua_settable_field(L, integer, limits, maxMemoryAllocationCount);                        \
    lua_settable_field(L, integer, limits, maxSamplerAllocationCount);                       \
    lua_settable_field(L, integer, limits, bufferImageGranularity);                          \
    lua_settable_field(L, integer, limits, sparseAddressSpaceSize);                          \
    lua_settable_field(L, integer, limits, maxBoundDescriptorSets);                          \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorSamplers);                   \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorUniformBuffers);             \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorStorageBuffers);             \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorSampledImages);              \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorStorageImages);              \
    lua_settable_field(L, integer, limits, maxPerStageDescriptorInputAttachments);           \
    lua_settable_field(L, integer, limits, maxPerStageResources);                            \
    lua_settable_field(L, integer, limits, maxDescriptorSetSamplers);                        \
    lua_settable_field(L, integer, limits, maxDescriptorSetUniformBuffers);                  \
    lua_settable_field(L, integer, limits, maxDescriptorSetUniformBuffersDynamic);           \
    lua_settable_field(L, integer, limits, maxDescriptorSetStorageBuffers);                  \
    lua_settable_field(L, integer, limits, maxDescriptorSetStorageBuffersDynamic);           \
    lua_settable_field(L, integer, limits, maxDescriptorSetSampledImages);                   \
    lua_settable_field(L, integer, limits, maxDescriptorSetStorageImages);                   \
    lua_settable_field(L, integer, limits, maxDescriptorSetInputAttachments);                \
    lua_settable_field(L, integer, limits, maxVertexInputAttributes);                        \
    lua_settable_field(L, integer, limits, maxVertexInputBindings);                          \
    lua_settable_field(L, integer, limits, maxVertexInputAttributeOffset);                   \
    lua_settable_field(L, integer, limits, maxVertexInputBindingStride);                     \
    lua_settable_field(L, integer, limits, maxVertexOutputComponents);                       \
    lua_settable_field(L, integer, limits, maxTessellationGenerationLevel);                  \
    lua_settable_field(L, integer, limits, maxTessellationPatchSize);                        \
    lua_settable_field(L, integer, limits, maxTessellationControlPerVertexInputComponents);  \
    lua_settable_field(L, integer, limits, maxTessellationControlPerVertexOutputComponents); \
    lua_settable_field(L, integer, limits, maxTessellationControlPerPatchOutputComponents);  \
    lua_settable_field(L, integer, limits, maxTessellationControlTotalOutputComponents);     \
    lua_settable_field(L, integer, limits, maxTessellationEvaluationInputComponents);        \
    lua_settable_field(L, integer, limits, maxTessellationEvaluationOutputComponents);       \
    lua_settable_field(L, integer, limits, maxGeometryShaderInvocations);                    \
    lua_settable_field(L, integer, limits, maxGeometryInputComponents);                      \
    lua_settable_field(L, integer, limits, maxGeometryOutputComponents);                     \
    lua_settable_field(L, integer, limits, maxGeometryOutputVertices);                       \
    lua_settable_field(L, integer, limits, maxGeometryTotalOutputComponents);                \
    lua_settable_field(L, integer, limits, maxFragmentInputComponents);                      \
    lua_settable_field(L, integer, limits, maxFragmentOutputAttachments);                    \
    lua_settable_field(L, integer, limits, maxFragmentDualSrcAttachments);                   \
    lua_settable_field(L, integer, limits, maxFragmentCombinedOutputResources);              \
    lua_settable_field(L, integer, limits, maxComputeSharedMemorySize);                      \
    lua_settable_field_arraye(L, integer, limits, maxComputeWorkGroupCount, 3);              \
    lua_settable_field(L, integer, limits, maxComputeWorkGroupInvocations);                  \
    lua_settable_field_arraye(L, integer, limits, maxComputeWorkGroupSize, 3);               \
    lua_settable_field(L, integer, limits, subPixelPrecisionBits);                           \
    lua_settable_field(L, integer, limits, subTexelPrecisionBits);                           \
    lua_settable_field(L, integer, limits, mipmapPrecisionBits);                             \
    lua_settable_field(L, integer, limits, maxDrawIndexedIndexValue);                        \
    lua_settable_field(L, integer, limits, maxDrawIndirectCount);                            \
    lua_settable_field(L, number, limits, maxSamplerLodBias);                                \
    lua_settable_field(L, number, limits, maxSamplerAnisotropy);                             \
    lua_settable_field(L, integer, limits, maxViewports);                                    \
    lua_settable_field_arraye(L, integer, limits, maxViewportDimensions, 2);                 \
    lua_settable_field_arraye(L, number, limits, viewportBoundsRange, 2);                    \
    lua_settable_field(L, integer, limits, viewportSubPixelBits);                            \
    lua_settable_field(L, integer, limits, minMemoryMapAlignment);                           \
    lua_settable_field(L, integer, limits, minTexelBufferOffsetAlignment);                   \
    lua_settable_field(L, integer, limits, minUniformBufferOffsetAlignment);                 \
    lua_settable_field(L, integer, limits, minStorageBufferOffsetAlignment);                 \
    lua_settable_field(L, integer, limits, minTexelOffset);                                  \
    lua_settable_field(L, integer, limits, maxTexelOffset);                                  \
    lua_settable_field(L, integer, limits, minTexelGatherOffset);                            \
    lua_settable_field(L, integer, limits, maxTexelGatherOffset);                            \
    lua_settable_field(L, number, limits, minInterpolationOffset);                           \
    lua_settable_field(L, number, limits, maxInterpolationOffset);                           \
    lua_settable_field(L, integer, limits, subPixelInterpolationOffsetBits);                 \
    lua_settable_field(L, integer, limits, maxFramebufferWidth);                             \
    lua_settable_field(L, integer, limits, maxFramebufferHeight);                            \
    lua_settable_field(L, integer, limits, maxFramebufferLayers);                            \
    lua_settable_field(L, integer, limits, framebufferColorSampleCounts);                    \
    lua_settable_field(L, integer, limits, framebufferDepthSampleCounts);                    \
    lua_settable_field(L, integer, limits, framebufferStencilSampleCounts);                  \
    lua_settable_field(L, integer, limits, framebufferNoAttachmentsSampleCounts);            \
    lua_settable_field(L, integer, limits, maxColorAttachments);                             \
    lua_settable_field(L, integer, limits, sampledImageColorSampleCounts);                   \
    lua_settable_field(L, integer, limits, sampledImageIntegerSampleCounts);                 \
    lua_settable_field(L, integer, limits, sampledImageDepthSampleCounts);                   \
    lua_settable_field(L, integer, limits, sampledImageStencilSampleCounts);                 \
    lua_settable_field(L, integer, limits, storageImageSampleCounts);                        \
    lua_settable_field(L, integer, limits, maxSampleMaskWords);                              \
    lua_settable_field(L, integer, limits, timestampComputeAndGraphics);                     \
    lua_settable_field(L, number, limits, timestampPeriod);                                  \
    lua_settable_field(L, integer, limits, maxClipDistances);                                \
    lua_settable_field(L, integer, limits, maxCullDistances);                                \
    lua_settable_field(L, integer, limits, maxCombinedClipAndCullDistances);                 \
    lua_settable_field(L, integer, limits, discreteQueuePriorities);                         \
    lua_settable_field_arraye(L, integer, limits, pointSizeRange, 2);                        \
    lua_settable_field_arraye(L, integer, limits, lineWidthRange, 2);                        \
    lua_settable_field(L, number, limits, pointSizeGranularity);                             \
    lua_settable_field(L, number, limits, lineWidthGranularity);                             \
    lua_settable_field(L, integer, limits, strictLines);                                     \
    lua_settable_field(L, integer, limits, standardSampleLocations);                         \
    lua_settable_field(L, integer, limits, optimalBufferCopyOffsetAlignment);                \
    lua_settable_field(L, integer, limits, optimalBufferCopyRowPitchAlignment);              \
    lua_settable_field(L, integer, limits, nonCoherentAtomSize);)

#define lua_pushVkPhysicalDeviceProperties(L, properties) __code(                       \
    lua_newtable(L);                                                                    \
    lua_settable_field(L, integer, properties, apiVersion);                             \
    lua_settable_field(L, integer, properties, driverVersion);                          \
    lua_settable_field(L, integer, properties, vendorID);                               \
    lua_settable_field(L, integer, properties, deviceID);                               \
    lua_settable_field(L, integer, properties, deviceType);                             \
    lua_settable_field_arraye(L, integer, properties, pipelineCacheUUID, VK_UUID_SIZE); \
    lua_pushVkPhysicalDeviceLimits(L, properties.limits);                               \
    lua_pushVkPhysicalDeviceSparseProperties(L, properties.sparseProperties);)

#define check_vk_result(L, err) __code(                            \
    if (err != 0) {                                                \
        luaL_error(L, "[vulkan] Error: VkResult = {0}", (int)err); \
        return 0;                                                  \
    })

static VkAllocationCallbacks *g_Allocator = nullptr;
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
static VkDevice g_Device = VK_NULL_HANDLE;
static uint32_t g_QueueFamily = (uint32_t) -1;
static VkQueue g_Queue = VK_NULL_HANDLE;
static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;

static int EnumeratePhysicalDevices(lua_State *L) {
    auto instance = luaL_checkVkInstance(L, 1);
    uint32_t gpu_count;
    VkResult err = vkEnumeratePhysicalDevices(*instance, &gpu_count, nullptr);
    check_vk_result(L, err);
    std::vector<VkPhysicalDevice> gpus(gpu_count);
    err = vkEnumeratePhysicalDevices(*instance, &gpu_count, gpus.data());
    check_vk_result(L, err);
    lua_newtable(L); // 创建一个新的表来存放GPU和它们的属性
    int idx = 1;
    for (VkPhysicalDevice &device: gpus) {
        VkPhysicalDeviceProperties properties;
        vkGetPhysicalDeviceProperties(device, &properties);
        lua_pushnumber(L, idx++); // 为每个GPU设备推送一个索引到栈
        lua_newtable(L);          // 为每个GPU设备创建一个新的表
        lua_pushstring(L, "gpu");
        lua_pushVkPhysicalDevice(L, &device);
        lua_settable(L, -3);
        lua_pushstring(L, "properties");
        lua_pushVkPhysicalDeviceProperties(L, properties);
        lua_settable(L, -3);
        lua_settable(L, -3); // 将这个GPU的表设置到主表中
    }
    return 1;
}

static VkApplicationInfo lua_checkVkApplicationInfo(lua_State *L, int index) {
    VkApplicationInfo info{};
    luaL_checktype(L, index, LUA_TTABLE);

    lua_getfield(L, index, "sType");
    info.sType = static_cast<VkStructureType>(luaL_checkinteger(L, -1));
    lua_pop(L, 1);

    lua_getfield(L, index, "pNext");
    info.pNext = reinterpret_cast<void *>(static_cast<uintptr_t>(luaL_checkinteger(L, -1)));
    lua_pop(L, 1);

    lua_gettable_field(L, index, string, info, pApplicationName);
    lua_gettable_field(L, index, integer, info, applicationVersion);
    lua_gettable_field(L, index, string, info, pEngineName);
    lua_gettable_field(L, index, integer, info, engineVersion);
    lua_gettable_field(L, index, integer, info, apiVersion);

    return info;
}

static void lua_pushVkApplicationInfo(lua_State *L, const VkApplicationInfo &info) {
    lua_newtable(L);
    lua_settable_field(L, integer, info, sType);
    lua_settable_value(L, integer, pNext, static_cast<lua_Integer>(reinterpret_cast<uintptr_t>(info.pNext)));
    lua_settable_field(L, string, info, pApplicationName);
    lua_settable_field(L, integer, info, applicationVersion);
    lua_settable_field(L, string, info, pEngineName);
    lua_settable_field(L, integer, info, engineVersion);
    lua_settable_field(L, integer, info, apiVersion);
}

//static VkInstanceCreateInfo lua_checkVkInstanceCreateInfo(lua_State *L, int index) {
//    VkInstanceCreateInfo info{};
//    luaL_checktype(L, index, LUA_TTABLE);
//
//    lua_getfield(L, index, "sType");
//    info.sType = static_cast<VkStructureType>(luaL_checkinteger(L, -1));
//    lua_pop(L, 1);
//
//    lua_getfield(L, index, "pNext");
//    info.pNext = reinterpret_cast<void *>(static_cast<uintptr_t>(luaL_checkinteger(L, -1)));
//    lua_pop(L, 1);
//
//    lua_gettable_field(L, index, integer, info, flags);
//    lua_gettable_value(L, index, VkApplicationInfo, pApplicationInfo, info.pApplicationInfo);
//    lua_gettable_field(L, index, integer, info, enabledLayerCount);
//    lua_gettable_field_arraye(L, index, integer, info, ppEnabledLayerNames, info.enabledLayerCount);
//    lua_gettable_field(L, index, integer, info, enabledExtensionCount);
//    lua_gettable_field_arraye(L, index, integer, info, ppEnabledExtensionNames, info.enabledExtensionCount);
//
//    return info;
//}

static void lua_pushVkInstanceCreateInfo(lua_State *L, const VkInstanceCreateInfo &info) {
    lua_newtable(L);
    lua_settable_field(L, integer, info, sType);
    if (info.pNext)
        lua_settable_value(L, integer, pNext, reinterpret_cast<lua_Integer>(info.pNext));
    lua_settable_field(L, integer, info, flags);
    if (info.pApplicationInfo)
        lua_settable_value(L, VkApplicationInfo, pApplicationInfo, *info.pApplicationInfo);
    //    lua_settable_field(L, integer, info, enabledLayerCount);
    lua_settable_field_arraye(L, string, info, ppEnabledLayerNames, info.enabledLayerCount);
    //    lua_settable_field(L, integer, info, enabledExtensionCount);
    lua_settable_field_arraye(L, string, info, ppEnabledExtensionNames, info.enabledExtensionCount);
}

static void lua_pushVkExtensionProperties(lua_State *L, const VkExtensionProperties &info) {
    lua_newtable(L);
    lua_settable_field(L, string, info, extensionName);
    lua_settable_field(L, integer, info, specVersion);
}

static int CreateVkInstanceCreateInfo(lua_State *L) {
    VkInstanceCreateInfo info{};
    lua_pushVkInstanceCreateInfo(L, info);
    printf("TOP:%d\n", lua_gettop(L));
    return 1;
}

//static int CreateInstance(lua_State *L) {
//    auto info = lua_checkVkInstanceCreateInfo(L, 1);
//}

static int EnumerateInstanceExtensionProperties(lua_State *L) {
    VkResult err;
    uint32_t properties_count;
    vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, nullptr);
    std::vector<VkExtensionProperties> properties(properties_count);
    err = vkEnumerateInstanceExtensionProperties(nullptr, &properties_count, properties.data());
    check_vk_result(L, err);
    lua_newtable(L); // 创建一个新的表来存放GPU和它们的属性
    int idx = 1;
    for (VkExtensionProperties &property: properties) {
        lua_pushnumber(L, idx++);
        lua_pushVkExtensionProperties(L, property);
        lua_settable(L, -3);
    }
    return 1;
}

static const struct luaL_Reg functions[] = {
        {"EnumerateInstanceExtensionProperties", EnumerateInstanceExtensionProperties},
        {"CreateVkInstanceCreateInfo",           CreateVkInstanceCreateInfo},
        {"EnumeratePhysicalDevices",             EnumeratePhysicalDevices},

        {nullptr,                                nullptr} /* sentinel */
};

static void lua_push_VkInstanceCreateFlagBits(lua_State *L) {
    lua_newtable(L);
    lua_push_enum(L, VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR);
    lua_push_enum(L, VK_INSTANCE_CREATE_FLAG_BITS_MAX_ENUM);
}

static void lua_push_VkStructureType(lua_State *L) {
    lua_newtable(L);
    lua_push_enum(L, VK_STRUCTURE_TYPE_APPLICATION_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_SPARSE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FENCE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EVENT_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_BARRIER);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_END_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_BARRIER_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEPENDENCY_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBMIT_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COPY_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_COPY_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_BLIT_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRESENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_HDR_METADATA_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID);
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX);
#endif
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT);
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR);
#endif
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GEOMETRY_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRESENT_ID_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT);
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV);
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
    lua_push_enum(L, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV);
#endif
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC);
    lua_push_enum(L, VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE);
    lua_push_enum(L, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR);
    lua_push_enum(L, VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT);
    lua_push_enum(L, VK_STRUCTURE_TYPE_MAX_ENUM);
}

int luaopen_vulkan(lua_State *L) {
    luaL_newlib(L, functions);
    lua_push_enums(L, VkStructureType, lua_push_VkStructureType(L));
    lua_push_enums(L, VkInstanceCreateFlagBits, lua_push_VkInstanceCreateFlagBits(L));

    lua_settable_value(L, integer, VK_KHR_multiview, VK_KHR_multiview);
    lua_settable_value(L, integer, VK_KHR_MULTIVIEW_SPEC_VERSION, VK_KHR_MULTIVIEW_SPEC_VERSION);
    lua_settable_value(L, string, VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_EXTENSION_NAME);

    lua_settable_value(L, integer, VK_KHR_get_physical_device_properties2, VK_KHR_get_physical_device_properties2);
    lua_settable_value(L, integer, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION,
                       VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION);
    lua_settable_value(L, string, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
                       VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);

    lua_settable_value(L, integer, VK_KHR_shader_draw_parameters, VK_KHR_shader_draw_parameters);
    lua_settable_value(L, integer, VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION,
                       VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION);
    lua_settable_value(L, string, VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
                       VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME);

    lua_settable_value(L, integer, VK_KHR_maintenance1, VK_KHR_maintenance1);
    lua_settable_value(L, integer, VK_KHR_MAINTENANCE_1_SPEC_VERSION, VK_KHR_MAINTENANCE_1_SPEC_VERSION);
    lua_settable_value(L, string, VK_KHR_MAINTENANCE_1_EXTENSION_NAME, VK_KHR_MAINTENANCE_1_EXTENSION_NAME);

    lua_settable_value(L, integer, VK_KHR_MAINTENANCE1_SPEC_VERSION, VK_KHR_MAINTENANCE1_SPEC_VERSION);
    lua_settable_value(L, string, VK_KHR_MAINTENANCE1_EXTENSION_NAME, VK_KHR_MAINTENANCE1_EXTENSION_NAME);

    return 1;
}